From: Evan Welsh Date: Sat, 30 Oct 2021 22:11:10 +0000 (-0700) Subject: background: Don't override synchronous load() with an async version X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~530^2^2~257 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=828da18b72c75ecd27c6aaaeadbcde8ab00590a2;p=gnome-shell.git background: Don't override synchronous load() with an async version Instead, override the asynchronous version to avoid conflicting with the parent signature. Part-of: --- diff --git a/js/ui/background.js b/js/ui/background.js index 1f7c5e572..1ddb9d6f3 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -177,7 +177,7 @@ var BackgroundCache = class BackgroundCache { animation = new Animation({ file: params.file }); - animation.load(() => { + animation.load_async(null, () => { this._animations[params.settingsSchema] = animation; if (params.onLoaded) { @@ -634,11 +634,12 @@ class Animation extends GnomeDesktop.BGSlideShow { this.loaded = false; } - load(callback) { - this.load_async(null, () => { + // eslint-disable-next-line camelcase + load_async(cancellable, callback) { + super.load_async(cancellable, () => { this.loaded = true; - if (callback) - callback(); + + callback?.(); }); }